package testplan.guice;

import com.google.inject.servlet.ServletModule;

import testplan.servlets.*;

/**
 * This module configures servlet mapping. It replaces web.xml file.
 */
public class TestPlanServletModule extends ServletModule
{
    @Override
    protected void configureServlets()
    {
    	filter("/*").through(SetMockUserFilter.class); //TODO remove this for production
    	filter("/action/*").through(CheckLoginFilter.class);
        serve("/action/echo/*").with(EchoActionServlet.class);
        serve("/action/project").with(ProjectServlet.class);
        serve("/action/user").with(UserServlet.class);
        serve("/action/testplan").with(TestPlanServlet.class);
    }
}
